package book;

public class Book {
    private String name;
    private String author;
    private int prace;
    private String type;
    private boolean isLend; //是否被借出

    public Book(String name, String author, int prace, String type) {
        this.name = name;
        this.author = author;
        this.prace = prace;
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getPrace() {
        return prace;
    }

    public void setPrace(int prace) {
        this.prace = prace;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean isLend() {
        return isLend;
    }
   public boolean getLend(){
        return this.isLend;
   }
    public void setLend(boolean lend) {
        isLend = lend;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", prace=" + prace +
                ", type='" + type + '\'' + ","+
                (isLend ? "已借出" : "未借出")+
                '}';
    }
}
